﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using XmlSockets.Internal;

namespace XmlSockets
{
    /// <summary>
    /// 
    /// </summary>
    public class XmlMessage
    {
        /// <summary>
        /// 
        /// </summary>
        public XmlReader Reader { get; internal set; }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public XElement ToXElement()
        {
            return XElement.Load(Reader);
        }

        /// <summary>
        /// 
        /// </summary>
        internal XmlMessage()
        {
            
            Reader = null;
        }
    }
}
